package com.tourlaid.mamagerment.action.wx

import com.tourlaid.mamagerment.ao.wx.StoreThoughtsAo
import com.tourlaid.mamagerment.entity.ResponseData
import com.tourlaid.mamagerment.vo.HomeVo
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import javax.annotation.Resource

/**
 * Created by xiaoyongge on 2017/7/23.
 * 首页
 */
@RestController
@RequestMapping("/tld/admin/sthoughts")
class StoreThoughtsAction {

    @Resource
    var storeThoughtsAo: StoreThoughtsAo? = null

    @RequestMapping("/getSoreInfo.json")
    fun getSoreInfo(storeId: Long): ResponseData<MutableMap<String, String?>> {
        val map = storeThoughtsAo!!.getSoreInfo(storeId);
        return ResponseData(map)
    }

    @RequestMapping("/queryThoughts.json")
    fun queryThoughts(storeId: Long, pageNo: Int): ResponseData<MutableList<MutableList<HomeVo>>> {
        val responseData = storeThoughtsAo!!.queryThoughts(storeId, pageNo);
        return responseData
    }

    @RequestMapping("/queryImages.json")
    fun queryImages(storeId: Long, imageType: Int): ResponseData<List<String>> {
        val list = storeThoughtsAo!!.queryImages(storeId, imageType);
        return ResponseData(list)
    }

}